cmake_minimum_required(VERSION 3.20)
project(sm2 C)

set(CMAKE_C_STANDARD 99)

# Enable compiler sanitizers
#set(SANITIZER_FLAGS "-fsanitize=address -fsanitize=undefined")
## Add the flags for debug builds
#if (CMAKE_BUILD_TYPE MATCHES Debug)
#    message(STATUS "Adding sanitizers: ${SANITIZER_FLAGS}")
#    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_FLAGS}")
#endif()

add_executable(
    sm2
    main.c
    crypto/sm2.c
    crypto/sm2.h
)
